package com.miyu.client1.pojo.book;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "book_rule_set")
public class BookRuleSet {
    private String ruleId;
    private String ruleName;
    private String rootSource;
    private String rootSearch;
    private String rootType;
    private String ruleBookList;
    private String ruleChapterList;
    private String isStop;
    private String ruleSet;

    @Id
    @Column(name = "rule_id", nullable = false, length = 32)
    public String getRuleId() {
        return ruleId;
    }

    public void setRuleId(String ruleId) {
        this.ruleId = ruleId;
    }

    @Basic
    @Column(name = "rule_name", nullable = true, length = 50)
    public String getRuleName() {
        return ruleName;
    }

    public void setRuleName(String ruleName) {
        this.ruleName = ruleName;
    }

    @Basic
    @Column(name = "root_source", nullable = true, length = 255)
    public String getRootSource() {
        return rootSource;
    }

    public void setRootSource(String rootSource) {
        this.rootSource = rootSource;
    }

    @Basic
    @Column(name = "root_search", nullable = true, length = 255)
    public String getRootSearch() {
        return rootSearch;
    }

    public void setRootSearch(String rootSearch) {
        this.rootSearch = rootSearch;
    }

    @Basic
    @Column(name = "root_type", nullable = true, length = 20)
    public String getRootType() {
        return rootType;
    }

    public void setRootType(String rootType) {
        this.rootType = rootType;
    }

    @Basic
    @Column(name = "rule_book_list", nullable = true, length = 50)
    public String getRuleBookList() {
        return ruleBookList;
    }

    public void setRuleBookList(String ruleBookList) {
        this.ruleBookList = ruleBookList;
    }

    @Basic
    @Column(name = "rule_chapter_list", nullable = true, length = 50)
    public String getRuleChapterList() {
        return ruleChapterList;
    }

    public void setRuleChapterList(String ruleChapterList) {
        this.ruleChapterList = ruleChapterList;
    }

    @Basic
    @Column(name = "is_stop", nullable = true, length = 1)
    public String getIsStop() {
        return isStop;
    }

    public void setIsStop(String isStop) {
        this.isStop = isStop;
    }

    @Basic
    @Column(name = "rule_set", nullable = true, length = 2000)
    public String getRuleSet() {
        return ruleSet;
    }

    public void setRuleSet(String ruleSet) {
        this.ruleSet = ruleSet;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BookRuleSet that = (BookRuleSet) o;
        return Objects.equals(ruleId, that.ruleId) && Objects.equals(ruleName, that.ruleName) && Objects.equals(rootSource, that.rootSource) && Objects.equals(rootSearch, that.rootSearch) && Objects.equals(rootType, that.rootType) && Objects.equals(ruleBookList, that.ruleBookList) && Objects.equals(ruleChapterList, that.ruleChapterList) && Objects.equals(isStop, that.isStop) && Objects.equals(ruleSet, that.ruleSet);
    }

    @Override
    public int hashCode() {
        return Objects.hash(ruleId, ruleName, rootSource, rootSearch, rootType, ruleBookList, ruleChapterList, isStop, ruleSet);
    }
}
